package com.ruoyi.logistic.enums;

/**
 * 结算类型
 *
 * @author ruoyi
 */
public enum SettleWeightSourceEnum
{
    network_weighing("networkWeighing", "网点称重"),
    center_weighing("centerWeighing", "中心称重"),
    volume_weight("volumeWeight", "体积重"),
    head_settlement_weight("headSettlementWeight", "总部结算重量"),
    recorded_weight("recordedWeight", "录单重量"),
    not_taken_weight("notTakenWeight", "未取到结算重量");

    private final String code;
    private final String info;

    SettleWeightSourceEnum(String code, String info)
    {
        this.code = code;
        this.info = info;
    }

    public String getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }

    public static String getValue(String code) {
        if (code == null) {
            return "";
        }
        for (SettleWeightSourceEnum value : SettleWeightSourceEnum.values()) {
            if (value.code.equals(code)){
                return value.info;
            }
        }
        return "";
    }
}
